package com.ruge.act;

import lombok.extern.slf4j.Slf4j;
import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener;
import org.springframework.stereotype.Component;

import java.util.Arrays;
import java.util.List;

/**
 * 部门经理监听器
 * <p>
 * @author ruge.wu
 * @version 0.0.7
 * @ClassName BmjlTaskListener
 * @date 2020.07.01 14:53
 */
@Slf4j
@Component
public class BmjlTaskListener implements TaskListener {

    @Override
    public void notify(DelegateTask delegateTask) {
        List<String> list = Arrays.asList("BMJL_1", "BMJL_2", "BMJL_3", "BMJL_4", "BMJL_5");
        delegateTask.addCandidateUsers(list);
        System.out.println("部门经理审批任务监听器..."+delegateTask.getCandidates());
    }
}
